package com.bdmc.alarm.domain;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.bdmc.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

/**
 * 告警事件对象 alarm_event
 *
 * @author bdmc
 * @date 2022-03-10
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("alarm_event")
public class AlarmEvent extends BaseEntity {

    private static final long serialVersionUID=1L;

    /**
     * 事件id
     */
    @TableId(value = "event_id")
    private Long eventId;

    private Long deptId;

    private Long deviceId;
    /**
     * person或car
     */
    private String targetType;
    /**
     * 报警规则类型
     */
    private String alarmType;
    /**
     * 车辆id
     */
    private Long carId;
    /**
     * 围栏id
     */
    private Long fenceId;
    /**
     * 人员id
     */
    private Long personId;
    /**
     * 排班计划详细id
     */
    private Long workPlanId;

    private Long workTeamId;
    /**
     * 事件开始时间
     */
    private LocalDateTime eventStart;
    /**
     * 事件结束时间
     */
    private LocalDateTime eventEnd;
    /**
     * 事件是否已结束，0=未结束，1=已结束
     */
    private Integer eventFinish;
    /**
     * 事件描述
     */
    private String eventDesc;
    /**
     * 持续时长 分钟
     */
    private Long persistTime;

}
